#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

void *FunTest( void *arg )
{
    int *piData = arg;
    
    while(1)
    {
        printf("sub  Thread Running... iData(sub ) = %d\n", *piData );
        sleep(3);
        (*piData)++;
    }
}

int main(int argc, char const *argv[])
{
    pthread_t tidFunTest;
    
    int iData = 10;

    pthread_create( &tidFunTest, NULL, FunTest, &iData );

    while(1)
    {
        printf( "main Thread Running... iData(main) = %d\n", iData );
        sleep(5);
    }

    return 0;
}
